package org.stone.project;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.stone.project.pro.domain.TxMsg;
import org.stone.project.pro.service.TxMsgService;
import reactor.core.publisher.Mono;

@SpringBootApplication
public class Demo {
    public static void main(String[] args) throws InterruptedException {
        ConfigurableApplicationContext run = SpringApplication.run(Demo.class);

        TxMsgService bean = run.getBean(TxMsgService.class);
        Mono<TxMsg> txMsgMono = bean.test2();
        txMsgMono.subscribe(e->{
            System.out.println(Thread.currentThread().getName());
            System.out.println("保存成功");
        });


        Thread.currentThread().join();
    }
}
